package lec03.am.p2;

public class Point {
	int x;
	int y;

	public Point() {
		this(0);
	}

	public Point(int i, int j) {
		this.x = i;
		this.y = j;
	}

	public Point(int i) {
		this(i,0);

	}

	public Point(Point p) {
		this(p.x,p.y);
	}

	// void f(int j)
	// {
	// int x=0;
	// x++;
	// }
	public double getDistance(Point that) {
		int dx = this.x - that.x;
		int dy = this.y - that.y;

		return Math.sqrt(dx * dx + dy * dy);
	}

}
